package com.future.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.future.domain.DTO.MediaResourceDTO;
import com.future.domain.MediaResource;
import com.future.domain.Result;
import com.future.domain.vo.MediaResourceVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface MediaResourceService extends IService<MediaResource> {

    /**
     * 审核媒体资源
     * @param id 资源ID
     * @param approved 是否通过审核(1通过，0拒绝)
     * @param reason 拒绝原因(如果拒绝)
     * @return 审核结果
     */
    Result approveMedia(Long id, Integer approved, String reason);

    /**
     * 获取待审核的媒体资源列表
     * @param pageNum 页码
     * @param pageSize 每页数量
     * @return 待审核资源列表
     */
    Result getPendingMedia(Integer pageNum, Integer pageSize);
    Result uploadMedia(MultipartFile file,int type);
    Result deleteMinioMedia(String fileType,String filePath);
    Result deleteMedia(Long id);
    Result getMediaInfo(Long id);
    Result listByType(String fileType, Integer pageNum, Integer pageSize);
    Result listByUser(Integer pageNum, Integer pageSize);
    Result downloadMedia(Long id);

    Result listByUserAndType(String fileType, Integer pageNum, Integer pageSize);

    Result uploadTODB(MediaResourceDTO mediaResourceDTO);

    Result updateMediaById(Long id, MediaResourceDTO mediaResource);


    void downloadBigMedia(Long id, HttpServletResponse response);
}